﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DNA.OpenAPI.Sitemap;

namespace DNA.Mvc.Services
{
    public abstract class SiteMapGeneratorBase : Command
    {
        protected abstract void OnGenerateSiteMap(List<Sitemap> sitemaps);

        public override void Execute(CommandContext context)
        {
            OnGenerateSiteMap(((SitemapIndex)context.Bag).SiteMapFiles);
        }
    }
}
